<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class user_edit extends Page
{
       public $Label1 = null;
       public $Edit1 = null;
       public $hiddenUserId = null;
       public $chkAdmin = null;
       public $btnEdit = null;
       public $Image1 = null;
       public $btnCancel = null;
       public $edConfirm = null;
       public $lblconfirmpw = null;
       public $edPass = null;
       public $lblPassword = null;
       public $edUser = null;
       public $lblUsername = null;
       function user_editCreate($sender, $params)
       {
       $user_id = $_GET['user_id'];
       if($user_id!='' || $user_id!=null)
       $this->hiddenUserId->setValue($user_id);

       $result_select = mysql_query("SELECT * FROM accounts_tbl WHERE auto_id='".$this->hiddenUserId->getValue()."'")
       or die("SELECT USERS ".mysql_error());
       $row_select = mysql_fetch_array($result_select);

       $this->edUser->setText($row_select['username']);
       }




}

global $application;

global $user_edit;

//Creates the form
$user_edit=new user_edit($application);

//Read from resource file
$user_edit->loadResource(__FILE__);

//Shows the form
$user_edit->show();

?>